<template>
	<view id="view">
		<view class="item" v-for="(item,index) in recordList" :key="item.id">
			<u-cell title="打卡日期" :value="utils.dateString(new Date(item.date_time))"></u-cell>
			<u-cell title="点击进行定位" :value="item.longitude == null ? '未定位': `(${item.longitude},${item.latitude})`"></u-cell>
			<u-cell title="健康状况" :value="item.health"></u-cell>
			<view class="textarea" v-text="item.remark!=null?item.remark:'无'"></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				recordList:[]
			}
		},
		onLoad() {
			const that = this
			that.API({
				showLoading:true,
				url:'/user/records',
				code0:function(res){
					that.recordList = res.data.data
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	#view{
		.item{
			background-color: white;
			margin: 20upx 0;
			.textarea{
				height: 200upx;
				padding: 20upx;
				color: #666;
			}
		}
	}
</style>

